package de.blinkt.openvpn.advancedsettings2;

import android.app.Activity;
import android.widget.ArrayAdapter;
import de.blinkt.openvpn.R;
import de.blinkt.openvpn.advancedsettings2.AdvancedSettingsPresenter.NetworkListItem;

public class ConfiguredNetworkItemPresenter {

	private ConfigureNetworkItemView mView;
	private NetworkListItem mModel;
	private Activity mActivity;
	private ArrayAdapter<CharSequence> mProxyTypeListModel;

	public ConfiguredNetworkItemPresenter(Activity activity, ConfigureNetworkItemView view) {
		mView = view;
		mActivity = activity;

	}
	
	public void setModel(NetworkListItem item) {
		mModel = item;
		
	}
	
	public void initView() {
		//display values from item
		
		
		mProxyTypeListModel =  ArrayAdapter.createFromResource(mActivity,R.array.proxy_type_entries, android.R.layout.simple_spinner_item);
		// Specify the layout to use when the list of choices appears
		mProxyTypeListModel.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
		// Apply the adapter to the spinner
		mView.getProxyType().setAdapter(mProxyTypeListModel);
		
		
		
		//init view listeners
	}
	
	
	
	
	
	interface ConfigureNetworkItemFinishedCallback {
		public void saved();
		public void cancelled();
		public void deleted();
	}

}
